import scrapy
class TonghuashunSpider(scrapy.Spider):
    name = 'tonghuashun'
    allowed_domains = ['10jqka.com.cn']

    url = 'http://data.10jqka.com.cn/market/zdfph'
    start_urls = [url]
    def parse(self, response):
        # with open("zdfph.html","w", encoding="utf-8") as file:
        #     file.write(response.text)

        for each in response.xpath("//*[@id=\"J-ajax-main\"]/table/tbody/tr"):
            print("================================")
            name = each.xpath("td[3]/a/text()").extract()[0]
            print(name)